﻿using System;
using UnityEngine;
using UnityEngine.Audio;

// Token: 0x02000354 RID: 852
public static class MixerVolume
{
	// Token: 0x0600156A RID: 5482 RVA: 0x00091C38 File Offset: 0x0008FE38
	public static void Set(AudioMixer mixer, MixerVolume.Names name, float volume)
	{
		float value = 20f * Mathf.Log10(Mathf.Clamp(volume, 0.0001f, 1f));
		mixer.SetFloat(name.ToString(), Mathf.Clamp(value, -80f, 0f));
	}

	// Token: 0x0600156B RID: 5483 RVA: 0x00091C88 File Offset: 0x0008FE88
	public static float Get(AudioMixer mixer, MixerVolume.Names name)
	{
		float value = 0f;
		return (!mixer.GetFloat(name.ToString(), out value)) ? 0f : Mathf.InverseLerp(-80f, 0f, value);
	}

	// Token: 0x02000355 RID: 853
	public enum Names
	{
		// Token: 0x04001981 RID: 6529
		MasterVolume,
		// Token: 0x04001982 RID: 6530
		BGMVolume,
		// Token: 0x04001983 RID: 6531
		PCMVolume,
		// Token: 0x04001984 RID: 6532
		ENVVolume,
		// Token: 0x04001985 RID: 6533
		GameSEVolume,
		// Token: 0x04001986 RID: 6534
		SystemSEVolume
	}
}
